package com.ruoyi.rabbitmq.listener;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;

//@Component
public class BizConsumer {
    @RabbitListener(queues = "bizQueue1")
    public void receiveBizMsg1(Message message, Channel channel){
        System.out.println("收到消息1：" + new String(message.getBody()));
    }


    @RabbitListener(queues = "bizQueue2")
    public void receiveBizMsg2(Message message, Channel channel){
        System.out.println("收到消息2：" + new String(message.getBody()));
    }
}
